package com.munhrasoft.dinamica.business.entities;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;

@Entity
@NamedQueries(value = {
		@NamedQuery(name = "findAllPassos", query = "SELECT passos FROM PassosProcesso passos"),
		@NamedQuery(name = "findPassosByDescricao", query = "SELECT passos FROM PassosProcesso passos where passos.descricao = :descricao")

})
@SequenceGenerator(name = "passosSeq", initialValue = 1, allocationSize = 1)
public class PassosProcesso {
    
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "passosSeq")
    private int id_passos;
    private String descricao;
    
    @Override
	public boolean equals(Object obj) {
		if (this.getId_passos() == ((PassosProcesso) obj).getId_passos()) {
			return true;
		} else {
			return false;
		}
	}
    
    public int getId_passos() {
        return id_passos;
    }
    public void setId_passos(int id_passos) {
        this.id_passos = id_passos;
    }
    public String getDescricao() {
        return descricao;
    }
    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

}
